//
//  PPUserAnnotation.m
//  pet
//
//  Created by Frank on 9/6/14.
//  Copyright (c) 2014 whalefin. All rights reserved.
//

#import "PPUserAnnotation.h"

@implementation PPUserAnnotation

+ (PPUserAnnotation *)annotationForPetShop:(PPUserInfo *)user
{
    PPUserAnnotation *annotation = [[PPUserAnnotation alloc] init];
    annotation.user = user;
    return annotation;
}

- (NSString *)title
{
    return self.user.userName;
}

- (NSString *)subtitle
{
    return nil;
}

- (CLLocationCoordinate2D)coordinate
{
    CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(self.user.lat, self.user.lng);
    NSDictionary *userCoordDict = BMKConvertBaiduCoorFrom(coordinate, BMK_COORDTYPE_GPS);
    coordinate = BMKCoorDictionaryDecode(userCoordDict);
    return coordinate;
}

@end
